<template>
	<div class="subpage resalestatus">
		<div class="content">
			<div class="status-imgbox">
				<img src="@/assets/img/home_img30.png" alt="">
			</div>
			<p class="text1">发布转售成功！</p>
			<p class="text2">转售金额：{{resData.totalPrice}}元</p>
			<div class="text3-box">
				<span class="text3">转售数量：{{resData.quantity}}{{resData.productUnit}}</span>
				<span class="text3">单价：{{resData.salePrice}}{{resData.salePriceUnit}}</span>
			</div>
			<div class="btn-box">
				<div class="button" @click="tohome">返回首页</div>
				<div class="button" @click="toResaleshelvesr">查看详情</div>
			</div>
			<div class="tip">
				<p>温馨提示</p>
				<p><span>1、</span>转售发布成功后，用户采购成功会以短信方式通知您。</p>
				<p><span>2、</span>转售资金会以收到短信日起 T+1个工作日转入账户余额，节假日顺延。</p>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				idData: {
					
				},
				resData: {
					
				}
			}
		},
		created() {
			this.idData = JSON.parse(this.$route.query.item);
			console.log(JSON.parse(this.$route.query.resdata))
			this.resData = JSON.parse(this.$route.query.resdata);
		},
		methods: {
			// 返回首页
			tohome(){
				this.$router.push({
					path: '/'
				})
			},
			// 查看详情
			toResaleshelvesr() {
				this.$router.push({
					path:'/my/resale/resaleshelves/' + this.idData.productId, // 商品详情id
					query: { item: JSON.stringify(this.idData) }
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import "@/assets/css/homeCom.scss";

	.resalestatus {
		background-color: #fff;
		.content {
			padding-bottom: 24px;
			.status-imgbox {
				margin-top: 60px;
				text-align: center;
				margin-bottom: 22px;
				img {
					width: 144px;
					margin-right: 20px;
				}
			}
			.text1 {
				font-size: 20px;
				color: #344047;
				font-weight: 500;
				text-align: center;
				margin-bottom: 16px;
			}
			.text2 {
				font-size: 16px;
				color: #5D6164;
				text-align: center;
				margin-bottom: 10px;
			}
			.text3-box {
				display: flex;
				justify-content: space-between;
				padding: 0 79px;
				margin-bottom: 48px;
				.text3 {
					color: #969C9E;
				}
			}
			.btn-box {
				display: flex;
				justify-content: space-between;
				padding: 0 49px;
				.button {
					width: 120px;
					height: 36px;
					line-height: 36px;
					border: 1px solid #31BC8D;
					color: #31BC8D;
					border-radius: 30px;
					text-align: center;
					font-size: 16px;
				}
			}
			.tip{
				color: #969C9E;
				padding: 0 50px 0 24px;
				margin-top: 40px;
				p{
					line-height: 24px;
					&:first-child {
						margin-bottom: 6px;
					}
				}
			}
		}
	}
</style>
